﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Krile.Forms.ConfigForm.Children
{
    public partial class Rendering : Krile.Kernel.Control.ConfigPage
    {
        public Rendering()
        {
            InitializeComponent();
        }

        private void Rendering_Load(object sender, EventArgs e)
        {
            UseListMiniIcon.Checked = Core.Config.Appearance.Renderer.ShowListIcon;
            P3StyleUserIcon.Checked = Core.Config.Appearance.Renderer.P3StyleUserIcon;
            ShowUserId.Checked = Core.Config.Appearance.Renderer.ShowUserId;
            UserNameCentering.Checked = Core.Config.Appearance.Renderer.UserNameCentering;
            NameAbove.Checked = Core.Config.Appearance.Renderer.NameAbove;
            ShowMainIcon.Checked = Core.Config.Appearance.Renderer.ShowMainIcon;
        }

        public override void Apply()
        {
            Core.Config.Appearance.Renderer.ShowListIcon = UseListMiniIcon.Checked;
            Core.Config.Appearance.Renderer.P3StyleUserIcon = P3StyleUserIcon.Checked;
            Core.Config.Appearance.Renderer.ShowUserId = ShowUserId.Checked;
            Core.Config.Appearance.Renderer.UserNameCentering = UserNameCentering.Checked;
            Core.Config.Appearance.Renderer.NameAbove = NameAbove.Checked;
            Core.Config.Appearance.Renderer.ShowMainIcon = ShowMainIcon.Checked;
        }
    }
}
